Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
Declare Function GetModuleFileName Lib "Kernel" (ByVal hModule As Integer, ByVal lpFileName As String, ByVal nSize As Integer) As Integer
Declare Function GetClassWord Lib "User" (ByVal hWnd As Integer, ByVal nIndex As Integer) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As Any, ByVal lplFileName As String) As Integer
Declare Function SetCapture Lib "User" (ByVal hWnd As Integer) As Integer
Declare Sub ReleaseCapture Lib "User" ()
Declare Sub GetCursorPos Lib "User" (lpPoint As POINTAPI)
Sub Form_Load ()
Select Case WindowState
Case 0
Caption = ""
Case 1
Caption = "VB API Help"
End Select
PutWindow
VBAPI.Refresh
End Sub
Sub Form_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
RButt = (Button And RIGHT_BUTTON) > 0
If RButt Then
Z = SetCapture(VBAPI.hWnd)
GetCursorPos Mouse
XOff = (Mouse.X * 15) - VBAPI.Left
YOff = (Mouse.Y * 15) - VBAPI.Top
MousePointer = 5
End If
End Sub
Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
RButt = (Button And RIGHT_BUTTON) > 0
If RButt Then
GetCursorPos Mouse
XPo = Signed%((Mouse.X * 15) - XOff)
YPo = Signed%((Mouse.Y * 15) - YOff)
Move XPo, YPo
End If
End Sub
Sub Form_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)